package org.alfalfa.web;

import org.alfalfa.exception.BizException;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author : Max-Goday
 * @Created : 2016-09-29
 * @E-mail : goday.max@gmail.com
 * @Version : 1.0
 */
@Controller
@RequestMapping("/vm")
public class VmController {

	@RequestMapping("/index")
	public String index(ModelMap map) {
		return "main";
	}

	@RequestMapping("/login")
	public String login(ModelMap map) {
		return "login";
	}

	@RequestMapping("/exception")
	public String exception() throws Exception {
		throw new Exception();
	}

	@RequestMapping("/jsonException")
	public String jsonException() throws Exception {
		throw new BizException("haha error");
	}


}
